#pragma once

#include <GLNew\glew.h>
#include <SFML/OpenGL.hpp>
#include <SFML/Window.hpp>
#include <iostream>
#include "ShaderLoader.hpp"


struct Handle
{
	const char * name;
	const char * nameInShader;
	GLuint id;
};


class Shader
{
public:
	Shader(void);
	Shader(const char* vertex_file_path, const char* fragment_file_path);
	~Shader(void);

	GLuint getId();
	char * getName();
	
	GLuint getHandleFor(const char*);
	void createHandle(const char * name, const char * nameInShader);
	GLuint getHandle(const char * name);

	void use();
	void deleteShader();

private:
	char * name;
	GLuint id;
	std::vector<Handle> allHandles;
};

